package cn.lili.mybatis.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;


/**
 * 数据库多场景模式基于标准基础实体类等实现
 *
 * @author Chopper
 * @version v1.0
 * @since 2020/8/20 14:34
 */
@EqualsAndHashCode(callSuper = true)
@Data
@JsonIgnoreProperties(value = {"handler", "fieldHandler"})
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public abstract class BaseSceneEntity extends BaseStandardEntity {


    @Serial
    private static final long serialVersionUID = -8742206081293021897L;

    /**
     * @see cn.lili.common.security.enums.SceneEnums
     */
    @ApiModelProperty(value = "场景", allowableValues = "MEMBER,STORE,SUPPLIER,MANAGER")
    private String scene;

    /**
     * 可以简介理解为场景下的id，与scene同步联用
     */
    @ApiModelProperty(value = "该场景下的id")
    private String extendId;


    @Override
    public BaseSceneEntity clone() throws CloneNotSupportedException {
        return (BaseSceneEntity) super.clone();
    }
}
